package com.zzh.lib.recorder.utils;

import android.app.admin.DevicePolicyManager;
import android.content.Context;

import com.zzh.lib.recorder.HRecorder;

/**
 * Created by ZZH on 2021/12/5.
 *
 * @Date: 2021/12/5
 * @Email: zzh_hz@126.com
 * @QQ: 1299234582
 * @Author: zzh
 * @Description: 相机工具类
 */
public class CameraUtils {
    /**
     * 检测相机是否可用
     *
     * @return true 相机可用。
     */
    public static boolean checkCameraEnable() {

        DevicePolicyManager dpm = (DevicePolicyManager) HRecorder.getApplication().getSystemService(Context.DEVICE_POLICY_SERVICE);

        if (dpm != null) {
            return dpm.getCameraDisabled(null);
        }
        return false;

    }

    public static int checkCameraNumber(){







        return -1;
    }
}
